package com.example.textview.util;

import android.os.Message;
import android.util.Log;
import android.widget.Toast;

import androidx.annotation.NonNull;

import com.example.textview.HandlerActivity;



import android.os.Handler;
import java.util.logging.LogRecord;

public class Test  {

    Handler handler;

    String msg="";

 public    MyThreadSave myThreadSave;

    public void setMsg(String msg) {
        this.msg = msg;

        imytnterface.callback(msg,"D100");
    }

    public  Test()
    {

        myThreadSave= new MyThreadSave();


    }

    private Imytnterface imytnterface;


    public void set()
    {

        new Thread(){

            @Override
            public void run() {
                super.run();


                try {
                    Thread.sleep(2*1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }

                Log.d("wwwwwww","11111111111");
                //imytnterface.callback("hello","D100");



            }
        }.start();


    }



    public void test1()
    {


        if( !myThreadSave.isAlive())
                myThreadSave.start();

        else {

            Log.d("WWWWWW","UIOPFKLKKKKKKKKKKKKKKKKKKK");
        }






    }



    public void setImytnterface(Imytnterface imytnterface) {
        this.imytnterface = imytnterface;
    }
}





